﻿using Microsoft.Phone.Controls;

namespace ScreenRotateSample.Views
{
    public partial class MainView : PhoneApplicationPage
    {
        public MainView()
        {
            InitializeComponent();
         /*   AccelerometerHelper.Instance.IsActive = true;
            if (AccelerometerHelper.Instance.NoAccelerometer)
            {
                System.Diagnostics.Debug.WriteLine("Accelerometer Not Found!");
            }
            else
            {
                DeviceOrientationHelper.Instance.OrientationChanged += new EventHandler<DeviceOrientationChangedEventArgs>(orientationHelper_OrientationChanged);
            }*/
        }

      /*  private void orientationHelper_OrientationChanged(object sender, DeviceOrientationChangedEventArgs e)
        {
            Deployment.Current.Dispatcher.BeginInvoke(() => ChangeOrientation(e));
        }

        private void ChangeOrientation(DeviceOrientationChangedEventArgs e)
        {
            if (e.CurrentOrientation == DeviceOrientation.PortraitRightSideUp) //PortraitRightSideUp
            {
                //TODO
                Debug.WriteLine("cima");
            }
            else if (e.CurrentOrientation == DeviceOrientation.PortraitUpSideDown) //PortraitUpSideDown
            {
                //TODO
                Debug.WriteLine("baixo");
            }
        }*/
    }
}